package com.draemoncode.weixindb.event;

import com.draemoncode.weixindb.constant.MessagePackageTypeConstant;
import com.draemoncode.weixindb.server.CMessagePackage;
import com.draemoncode.weixindb.server.IEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 第0步 初始化
 * @author yangz
 * @date 2017/4/9
 *
 */
@Component
@Slf4j
public class InitEvent implements IEvent {


    @Override
    public Boolean shoudProcess(CMessagePackage cMessagePackage) {
        if(MessagePackageTypeConstant.REQUEST_INIT.equals(cMessagePackage.getType())){
            return true;
        }
        return false;
    }

    @Override
    public Object busiExec(CMessagePackage cMessagePackage) {
        return null;
    }

    @Override
    public Object uiExec(CMessagePackage cMessagePackage, Object busiResult) {
        return null;
    }

    @Override
    public CMessagePackage buildResponse(CMessagePackage cMessagePackage, Object busiResult, Object uiResult) {
        return null;
    }

}
